"use strict";
import React from "react";
import { Table } from "antd";
import noData from "@/assets/images/noData.png";

/*
 * 组件注释
 * create by wuqiong
 * creation time 2021/06/17
 * 抽取表格组件做公共配置
 * */

const Index = (props) => {
  const { columns = [], searchValues, ...others } = props;

  return (
    <Table
      size={"small"}
      className={"commonTable"}
      columns={columns}
      locale={{
        emptyText: !others?.loading ? (
          <div className={"no_data_box"} style={{ padding: "70px 0" }}>
            <img style={{ width: 282 }} src={noData} alt="" />
            <p>
              {window.isEmpty(searchValues) ? "暂无相关内容" : "暂无搜索内容"}
            </p>
          </div>
        ) : (
          <div style={{ padding: "150px 0" }} />
        ),
      }}
      {...others}
    />
  );
};
export default Index;
